<%-- 
    Document   : piclist
    Created on : 2011-2-27, 0:29:39
    Author     : Administrator
--%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@include file="../header.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>图片列表</title>
<script type="text/javascript" src="js/upload.js"></script>
<script type="text/javascript">
	window.onload = function() {
		$('#pictures img').each(function() {
			$(this).style.width = window.screen.width;
		});
	}
</script>
</head>
<body>
	<%
		Map<String, String> topicMap = new TreeMap<String, String>();
		topicMap.put("01", "鋒鋒的故事");
		topicMap.put("02", "默默的故事");
		topicMap.put("03", "美好回憶");

		for (Iterator<String> iter = topicMap.keySet().iterator(); iter
				.hasNext();) {
			String flag = iter.next();
			String desc = topicMap.get(flag);
	%>
	<div name="picList" style="height: 230px">
		<div
			style="height: 15px; color: black; font-size: 14px; font-weight: bold;"><%=desc%>
		</div>
		<hr>
		<div style="height: 200px; overflow-y: auto;">
			<%
				List<PicInfo> list = BaseModelDAO
							.executeSqlForList("select from "
									+ PicInfo.class.getName() + " where flag=='"
									+ flag + "' ");

					for (PicInfo picInfo : list) {
						long id = picInfo.getId();
						String picname = picInfo.getPicName();
			%>

			<div
				style="width: 150px; float: left; margin-right: 20px; margin-left: 10px;">
				<div style="height: 150px;">
					<a target="_blank" href="pServer?id=<%=id%>"> <img
						width="150px" height="150px" style="border: 3px solid #ccc;"
						title="点击查看大图" src="pServer?id=<%=id%>&pictype=1" /> </a>
				</div>
				<div style="height: 10px;"></div>
				<div style="height: 40px">
					<div>
						<span>批量选中<input type="checkbox" name="choicePic"
							title="用于批量删除" value="<%=id + "," + picname%>" /> </span> <span><input
							type="button" value="单个删除"
							onclick="delpic('<%=id%>','<%=picname%>')" /> </span>
					</div>
					<div>
						<label>文件名称</label>
						<%=picname%></div>
					<div>
						<label>文件描述</label>
						<%=picInfo.getPicDesc()%></div>

				</div>
				<div style="height: 10px;"></div>
			</div>
			<%
				}
			%>
		</div>
	</div>
	<%
		}
	%>
</body>
</html>
